package com.skytech.tax.customsdatawarehouse.singlewindow.customsagententrusted.domain.entity;

import com.alibaba.fastjson.JSONObject;
import org.joda.time.DateTime;

/**
 * @author Lianhong
 * @since 2022/6/15
 */
public class EntrustedRelation {

    private String seqNo;
    private String consignNoL;          //委托书编号
    private String agentCode;           //被委托方企业海关代码
    private String beginDate;           //发起时间
    private String entrustedRel;        //委托协议数据
    private String storageTime;         //入库时间
    private String socialCreditCode;    //企业组织机构代码

    public EntrustedRelation(String socialCreditCode, JSONObject entrustedRel) {
        this.seqNo = entrustedRel.getString("seqNo");
        this.consignNoL = entrustedRel.getString("consignNoL");
        this.agentCode = entrustedRel.getString("agentCode");
        this.beginDate = entrustedRel.getString("beginDate");
        this.entrustedRel = entrustedRel.toJSONString();
        this.storageTime = DateTime.now().toString("yyyy-MM-dd HH:mm:ss");
        this.socialCreditCode = socialCreditCode;
    }

    public String getSeqNo() {
        return seqNo;
    }

    public void setSeqNo(String seqNo) {
        this.seqNo = seqNo;
    }

    public String getConsignNoL() {
        return consignNoL;
    }

    public void setConsignNoL(String consignNoL) {
        this.consignNoL = consignNoL;
    }

    public String getAgentCode() {
        return agentCode;
    }

    public void setAgentCode(String agentCode) {
        this.agentCode = agentCode;
    }

    public String getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(String beginDate) {
        this.beginDate = beginDate;
    }

    public String getEntrustedRel() {
        return entrustedRel;
    }

    public void setEntrustedRel(String entrustedRel) {
        this.entrustedRel = entrustedRel;
    }

    public String getStorageTime() {
        return storageTime;
    }

    public void setStorageTime(String storageTime) {
        this.storageTime = storageTime;
    }

    public String getSocialCreditCode() {
        return socialCreditCode;
    }

    public void setSocialCreditCode(String socialCreditCode) {
        this.socialCreditCode = socialCreditCode;
    }
}
